﻿using Microsoft.AspNetCore.Builder;
using NewRetail.Application.Components.WeChat;

namespace NewRetail.Api.Middlewares
{
    /// <summary>
    /// 中间件
    /// </summary>
    public static class MiddlewareHelpers
    {
        ///// <summary>
        ///// 签名验证中间件
        ///// </summary>
        ///// <param name="app"></param>
        ///// <returns></returns>
        //public static IApplicationBuilder UseSignatureCheck(this IApplicationBuilder app)
        //{
        //    return app.UseMiddleware<SignatureCheckHandlerMiddlewareAsync>();
        //}
        /// <summary>
        /// 请求响应中间件
        /// </summary>
        /// <param name="app"></param>
        /// <returns></returns>
        public static IApplicationBuilder UseReuestResponseNotify(this IApplicationBuilder app)
        {
            return app.UseMiddleware<MessageHandlerMiddlewareAsync>();
        }
    }
}
